//
// Created by Administrator on 2021/12/14.
//

#ifndef THREAD_CDB_CONNECT_HPP
#define THREAD_CDB_CONNECT_HPP
#include <mysql/mysql.h>


#include <string>
#include <memory>
class cdb_pool;
class cdb_connect
{
public:
    cdb_connect();
    explicit cdb_connect(std::shared_ptr<cdb_pool> pool);
    virtual ~cdb_connect();
    int init();
    std::string get_pool_name();
private:
    std::shared_ptr<cdb_pool> m_pdb_pool;
    // cdb_pool* m_pdb_pool; // 连接池指针
    MYSQL *mysql;
};


#endif //THREAD_CDB_CONNECT_HPP
